package com.zhangxin.designmode.fiveprinciple.openclosedprinciple.after;


/**
 * @author zhangxin
 * @date 2022/4/9
 */
public class AlertRule {

    private static final long MAX_TPS = 1000;
    private static final long MAX_ERROR_COUNT = 10;
    //增加超时请求数量
    private static final long MAX_TIMEOUT_COUNT = 10;

    public MatchedRule getMatchedRule(String api) {
        return new MatchedRule();
    }

    static class MatchedRule {
        public long getMaxTps() {
            return MAX_TPS;
        }

        public long getMaxErrorCount() {
            return MAX_ERROR_COUNT;
        }

        public long getMaxTimeoutTps() {
            return MAX_TIMEOUT_COUNT;
        }
    }

}
